import Vue from 'vue'
import Vuex from 'vuex'
// import $api from '../http/api'

import admin from './modules/admin.js'
import swipers from './modules/swipers.js'
import members from './modules/members.js'
import meals from './modules/meals.js'
import menus from './modules/menus.js'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: {}
  },
  mutations: {
    SET_USER_INFO(state, userInfo) {
      console.log(userInfo);
      state.userInfo = userInfo
    }
  },
  modules: {
    admin,swipers,
    members,
    meals,menus
  }
})
